/* -----------------------------------------------------
OVERRIDE BOOTSTRAP TO CENTER MODAL VERTICALLY.
----------------------------------------------------- */
.modal {
    text-align: center;
    padding: 0!important;
}

.modal:before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    margin-right: -4px;
}

/* -----------------------------------------------------
MODAL SIZES
----------------------------------------------------- */
.modal-dialog.modal-sdc-xl {
    width: 1200px;
}

.modal-dialog.modal-sdc-l {
    width: 875px;
}

.modal-dialog.modal-sdc-md {
    width: 650px;
}

.modal-dialog.modal-sdc-sm {
    width: 552px;
}

.modal-dialog.modal-sdc-auto {
    width: auto;
}

.modal-dialog.modal-sdc-xsm {
    width: 432px;
}

/* -----------------------------------------------------
MODAL WRAPPER
----------------------------------------------------- */
.modal-dialog {
    /*
    margin-top: 110px;
    width: 1000px;
    */
    display: inline-block;
    text-align: left;
    vertical-align: middle;
}

.modal-content {
    /*.border-radius(4px);
    background-color:  #ffffff;
    box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.5);
    min-height: 200px;*/
}

.modal-backdrop.in {
    // opacity: .8;
}

.modal-backdrop {
    background-color: #111922; //TODO: Replace the color
}

/* -----------------------------------------------------
PREVIOUS MODAL
----------------------------------------------------- */
/*.w-sdc-modal,
.modal-dialog,
.w-sdc-modal-confirmation {

    .w-sdc-modal-head {
        .s_18_r;
        height: 48px;
        line-height: 48px;
        text-align: center;
    }

    .w-sdc-modal-body {
        height: auto;
        padding: 20px 40px 20px 40px;
        border-bottom: solid 1px @color_a;
        position: relative;
    }

    .w-sdc-modal-body-content {
        .b_1;
        padding: 10px 0 0 0;
    }

    .w-sdc-modal-icon {
        display: inline-block;
    }

    .w-sdc-modal-icon-DEBUG { .sprite; .message-DEBUG;}
    .w-sdc-modal-icon-INFO { .sprite; .message-INFO;}
    .w-sdc-modal-icon-WARNING { .sprite; .message-WARNING;}
    .w-sdc-modal-icon-ERROR { .sprite; .message-ERROR;}

    .w-sdc-modal-caption {
        .a_6;
        display: inline-block;
        padding: 0 0 0 25px;
        vertical-align: top;
    }

    .w-sdc-modal-action {
        height: 99px;
        text-align: center;
        vertical-align: middle;
        line-height: 105px;
    }

    .sdc-resource-viewer-modal-head {
        .c_2;
        border-radius: 6px 6px 0 0;
        height: 30px;
        line-height: 30px;
        text-align: center;
    }

    .w-sdc-modal-close {
        background-image: url('');
        color: #3499F7; //TODO: Replace the color, should be sprite
        .hand;
        position: absolute;
        right: 20px;
        top: 20px;
        display: block;
        height: 13px;
        width: 12px;
        border-radius: 50%;
    }

    .w-sdc-resource-viewer-modal-close {
        color: #3499F7; //TODO: Replace the color, should be sprite
        .hand;
        position: absolute;
        right: 20px;
        top: 5px;
        display: block;
        line-height: normal;
        font-size: 18px;
        font-weight: bold;
    }

}*/

/* -----------------------------------------------------
NEW DESIGN MODAL
----------------------------------------------------- */
.modal-type-standard.w-sdc-classic-modal {
    .w-sdc-modal-head {
        border-bottom: solid 3px @main_color_a;
    }
}
.modal-type-error.w-sdc-classic-modal {
    .w-sdc-modal-head {
        border-bottom: solid 3px @func_color_q;
    }
}
.modal-type-alert.w-sdc-classic-modal {
    .w-sdc-modal-head {
        border-bottom: solid 3px @main_color_h;
    }
}

.w-sdc-classic-modal {

    display: flex;
    flex-direction: column;
    .border-radius(4px);
    background-color:  #ffffff;
    box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.5);
    min-height: 165px;
    min-width: 430px;
    word-wrap: break-word;

    .w-sdc-modal-head {
        flex-grow: 1;
        .s_18_r;
        height: 48px;
        line-height: 48px;
        display: flex;
        text-align: left;
        border-bottom: solid 3px @main_color_a;
        align-items: center;

        .w-sdc-modal-head-text {
            .s_18_r;
            flex-grow: 999;
        }

        .w-sdc-modal-close {
            flex-grow: 1;
            .sprite;
            .sprite.x-btn-black;
            cursor: pointer;
        }
    }

    .w-sdc-modal-body {
        flex-grow: 999;
        .m_14_r;
        padding-top: 20px;
        position: relative;
        border-bottom: none;
    }

    .w-sdc-modal-footer {
        clear: both;
        flex-grow: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        border-radius: 6px;
        background-color: #f8f8f8;

        button {
            display: block;
            margin-right: 11px;
        }

        button:last-child {
            margin-right: 0;
        }

    }

}

.w-sdc-classic-top-line-modal {

    display: flex;
    flex-direction: column;
    background-color:  #ffffff;
    box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.5);
    min-height: 165px;
    min-width: 430px;
    border-top: solid 3px @main_color_a;

    .w-sdc-modal-head {
        flex-grow: 1;
        .s_18_r;
        height: 48px;
        line-height: 48px;
        display: flex;
        text-align: left;
        align-items: center;

        .w-sdc-modal-head-text {
            .s_18_r;
            flex-grow: 999;
        }

        .w-sdc-modal-close {
            flex-grow: 1;
            .sprite;
            .sprite.x-btn-black;
            cursor: pointer;
        }
    }

    .w-sdc-modal-body {
        flex-grow: 999;
        .m_14_r;
        padding-top: 10px;
        position: relative;
        border-bottom: none;
    }

    .w-sdc-modal-footer {
        flex-grow: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;

        button {
            display: block;
            margin-right: 11px;
        }

        button:last-child {
            margin-right: 0;
        }

    }

}

.modal-sdc-xl {
    .w-sdc-classic-modal {
        padding: 0 40px;

        .w-sdc-modal-head {
            .b_15;
            height: 60px;
            line-height: 60px;

            .w-sdc-modal-head-text {
                flex-grow: 999;
            }

            .w-sdc-modal-close {
                top: 27px;
                right: 41px;
            }
        }

        .w-sdc-modal-footer {
            height: 80px;
            margin: 0 -40px;
            padding: 0 40px;
            background-color: #f2f2f2;
        }

    }
}

.modal-sdc-xl,
.modal-sdc-l,
.modal-sdc-md,
.modal-sdc-sm,
.modal-sdc-xsm,
.modal-sdc-auto {

    .w-sdc-classic-top-line-modal {
        padding: 0 30px;

        .w-sdc-modal-footer {
            margin: 0 -30px;
            padding: 17px 30px;
        }
    }

    .w-sdc-classic-modal {
        padding: 0 30px;

        .w-sdc-modal-head {
            .b_19;
            height: 50px;
            line-height: 50px;

            .w-sdc-modal-close {
                top: 21px;
                right: 30px;
            }
        }

        .w-sdc-modal-footer {
            margin: 0 -30px;
            padding: 17px 30px;
        }
    }
}
